/* 2025/6/16                                13:38:54             */ 
#ifndef __PARAMETER_H                            
#define __PARAMETER_H                            
#include "math.h"                                 

#define ADAPTIVE_RAMP                            (1)                  //Modification is prohibited 
#define SYNC_RAMP                                (2)                  //Modification is prohibited 
#define SMO                                      (1)                  //Modification is prohibited 
#define BEMFOB                                   (2)                  //Modification is prohibited 
#define RAMP_MODE                                ADAPTIVE_RAMP        
#define OBMODE                                   BEMFOB               
#define SVM_MODE_PARA                            E_SVM7               
#define CMD_DIR                                  E_CCW                
#define PU_CURR_PARA                             2621                 
#define PU_SPD_PARA                              3.12                 
#define PU_VOLT_PARA                             910                  
#define PU_VBUS_PARA                             75                   
#define PU_BEMF_PARA                             75                   
#define DISP_MAX_CURR_PARA                       12.50                
#define DISP_MAX_VBUS_PARA                       54.95                
#define DISP_MAX_SPD_PARA                        10500                
#define PWM_FREQ_PERIOD_PARA                     1500                 
#define PWM_FREQHALF_PERIOD_PARA                 750                  
#define PWM_IRQ_1KHZ_CNT_PARA                    16                   
#define DEADTIME_PARA                            48                   
#define RUN_DELTA_WR_FACTOR_PARA                 125                  
#define VBUSCOMPGAIN_PARA                        2684                 
#define SPD_TO_THETA_GAIN_PARA                   2867                 
#define TWO_SHUNT_SAMPLE_WINDOW_PARA             2621                 
#define VS_MAX_PARA                              15891                
#define VS_MAX_SQARQ_PARA                        7707                 
#define TS_MAX_PARA                              27524                
#define DISP_MAX_DUTY_PARA                       84.00                
#define ADC_SW_TRIG_PARA                         72                   
#define CMD_MAX_VALUE_SPD_PARA                   14356                
#define CMD_MIN_VALUE_SPD_PARA                   1872                 
#define ALM_OVP_LEVEL_PARA                       3876                 
#define ALM_OVP_RELEASE_LEVEL_PARA               3727                 
#define ALM_UVP_LEVEL_PARA                       596                  
#define ALM_UVP_RELEASE_LEVEL_PARA               857                  
#define ALM_OCP_LEVEL_PARA                       14417                
#define ALM_OCP_TIMES_PARA                       5                    
#define ALM_OVERSPD_LEVEL_H_PARA                 21845                
#define ALM_OVERSPD_LEVEL_L_PARA                 218                  
#define ALM_OVERSPD_TIME_PARA                    160                  
#define ALM_LOSTSYNC_TIME_PARA                   3200                 
#define ALM_LOSTSYNC_SPDFACTOR_PARA              9459                 
#define ALM_RAMP_TIMEOUT_PARA                    5000                 
#define ALM_LOSTPHASE_TIMES_PARA                 50                   
#define PRECHARGE_TIME_PARA                      800                  
#define PRECHARGE_DUTY_PARA                      300                  
#define ALIGN_1ST_TIME_PARA                      200                  
#define ALIGN_2ND_TIME_PARA                      400                  
#define ALIGN_CURR_INCR_TIME_PARA                250                  
#define ALIGN_1ST_CURR_PARA                      786                  
#define ALIGN_2ND_CURR_PARA                      786                  
#define ALIGN_1ST_CURR_ACC_PARA                  3                    
#define ALIGN_2ND_CURR_ACC_PARA                  0                    
#define ADAPTIVERAMP_CURR_PARA                   2621                 
#define ADAPTIVERAMP_CURR_ACC_PARA               2621                 
#define ADAPTIVERAMP_STABLE_TIME_PARA            20                   
#define ADAPTIVERAMP_SPD_TARGET_PARA             936                  
#define ADAPTIVERAMP_DELTATHETA_PARA             7                    
#define ADAPTIVERAMP_MIN_DELTATHETA_PARA         3                    
#define RAMP_CURR_PARA                           1573                 
#define RAMP_CURR_ACC_PARA                       8                    
#define RAMP_STABLE_TIME_PARA                    100                  
#define RAMP_SPD_TARGET_PARA                     624                  
#define RAMP_DELTA_WR_FACTOR_PARA                3                    
#define RUNTRANS_TIME_PARA                       500                  
#define BEMF_STOP_TH_PARA                        22                   
#define BEMF_CLOSELOOP_TH_PARA                   37                   
#define BEMF_V_GAIN_PARA                         400098               
#define BRAKE_TIME_PARA                          5000                 
#define BRAKE_QUIT_SPD_PARA                      2667                 
#define BRAKE_QUIT_SPD_PU_PARA                   94                   
#define IQ_KP_PARA                               30901                
#define IQ_KI_PARA                               3472                 
#define ID_KP_PARA                               30901                
#define ID_KI_PARA                               3472                 
#define VQMAX_PARA                               18918                
#define VQMIN_PARA                               -18918               
#define VDMAX_PARA                               18918                
#define VDMIN_PARA                               -18918               
#define SPD_KP_PARA                              13107                
#define SPD_KI_PARA                              49                   
#define SPD_PI_OUTPUT_MAX_PARA                   11796                
#define SPD_PI_OUTPUT_MIN_PARA                   -786                 
#define SMO_F_PARA                               29087                
#define SMO_G_PARA                               9552                 
#define SMO_KSLIDE_PARA                          15000                
#define SMO_KSLF_PARA                            8789                 
#define SMO_E0_PARA                              16384                
#define SMO_WE_LOWPASS_PARA                      5075                 
#define SMO_SPDGAIN_INTEGER_PARA                 23                   
#define SMO_SPDGAIN_DECIMAL_PARA                 1                    
#define SMO_PLL_KP_PARA                          1638                 
#define SMO_PLL_KI_PARA                          16                   
#define SMO_PLL_OUT_MAX_PARA                     26214                
#define SMO_PLL_OUT_MIN_PARA                     -26214               
#define BEMFOB_GAIN_R_PARA                       12630                
#define BEMFOB_GAIN_L_PARA                       10792                
#define BEMFOB_GAIN_W_PARA                       25133                
#define BEMFOB_WE_LOWPASS_PARA                   5075                 
#define BEMFOB_SPDGAIN_INTEGER_PARA              23                   
#define BEMFOB_SPDGAIN_DECIMAL_PARA              1                    
#define BEMFOB_PLL_KP_PARA                       164                  
#define BEMFOB_PLL_KI_PARA                       3                    
#define BEMFOB_PLL_OUT_MAX_PARA                  26214                
#define BEMFOB_PLL_OUT_MIN_PARA                  -26214               
#define SOFTSTOP_TIME_THRESHOLD_PARA             100                  
#define SOFTSTOP_SPD_THRESHOLD_PARA              936                  
#define SOFTSTOP_ID_CMD_PARA                     0                    
#define SOFTSTOP_IQ_CMD_PARA                     0                    
#define BEMFDET_SPD_DET_MIN_PARA                 2185                 
#define BEMFDET_DET_TIMEOUT_PARA                 129                  
#define BEMFDET_SPD_DET_MAX_PARA                 17476                
#define BEMFDET_CONECT_FACTOR_PARA               19864                
#define REVERSE_SPD_TH_PARA                      6554                 
#define REVERSE_ID_CMD_PARA                      1311                 
#define REVERSE_IQ_CMD_PARA                      655                  
#define DEADTIME_COMP_VALUE_PARA                 24                   
#define REVERSERAMP_CURR_PARA                    3932                 
#define REVERSERAMP_DELTA_WR_FACTOR_PARA         5                    
#endif 
/* __PARAMETER_H                            */                   
